import Vue from "vue"
import VueRouter from "vue-router"

import Layout from "@/pages/Layout"
import Home from "@/pages/Home"
import Search from "@/pages/Search"
import Play from "@/pages/Play"


Vue.use(VueRouter)

const router=new VueRouter({
	routes:[
		{
			path:"/",
			redirect:"/layout"
		},
		{
			path:"/layout",
			component:Layout,
			redirect:"/layout/home",
			children:[
				{
					path:"search",
					component:Search,
					meta:{title:"搜索"}
				},
				{
					path:"home",
					component:Home,
					meta:{title:"首页"}
				}
			]
		},
		{
			path:"/play",
			component:Play,
		}
	]
})

export default router